//
//  IMMessageManager.h
//  IMChezhil
//
//  Created by zhangliucheng on 15/7/26.
//  Copyright (c) 2015年 CheZhil. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "IMUserMessage.h"

@interface IMMessageManager : NSObject

+ (instancetype)shareInstance;

/**
 *  获取最近的消息记录.notice会将所有未读的信息标示为已读.
 */
- (NSMutableArray *)getRecentMessages:(NSInteger)count;

/**
 *  获取未读信息的条数.
 */
- (NSInteger)getUnReadCount;

- (IMUserMessage *)getMessageById:(NSString *)messageId;

- (void)saveMessage:(IMUserMessage *)message;
- (void)saveMessages:(NSArray *)messages;

- (void)updateMessage:(IMUserMessage *)message;
/**
 *  将所有发送中的信息更新到发送失败.
 */
- (void)updateSendStatus;
/**
 * 将所有消息标示为已读.
 */
- (void)updateReadStatus;
@end
